package com.droid.network.exception;

/**
 * App异常处理
 *
 * @author zyc0617
 * @since  2019/7/9 17:07
 */
public class AppExceptionHandle {

    private final static String TAG = "AppExceptionHandle";

    public static ResponseThrowable handleException(Throwable e) {
       return new ResponseThrowable(e, 1);
    }

    public static class ResponseThrowable extends Exception {
        public int code;
        public String message;

        public ResponseThrowable(Throwable throwable, int code) {
            super(throwable);
            this.code = code;
        }
    }
}

